import config from "@/config"
import http from "@/utils/request"
export default {
	upload: {
		url: `${config.API_URL}/upload/singleImg`,
		name: "图片上传",
		post: async function(data, config={}){
			return await http.post(this.url, data, config);
		}
	},
	uploadFile: {
		url: `${config.API_URL}/upload/singleFile`,
		name: "附件上传",
		post: async function(data, config={}){
			return await http.post(this.url, data, config);
		}
	},
	login: {
		url: `${config.API_URL}/admin/login`,
		name: "登录",
		post: async function(data, config={}){
			return await http.post(this.url, data, config);
		}
	},
	getRoutes: {
		url: `${config.API_URL}/main/get_menu`,
		name: "菜单获取",
		post: async function(data, config={}){
			return await http.post(this.url, data, config);
		}
	}
}
